@echo off
chcp 65001

del /q /s nupkgs\*.*
echo "已删除 nupkgs 目录下所有文件"
pause

dotnet pack Micro.Extensions.Data/Micro.Extensions.Data.csproj  -c Release --output nupkgs 
dotnet pack Micro.Extensions.Bridge/Micro.Extensions.Bridge.csproj  -c Release --output nupkgs 
dotnet pack Micro.Extensions.Cache/Micro.Extensions.Cache.csproj  -c Release --output nupkgs
dotnet pack Micro.Extensions.Cache.Redis/Micro.Extensions.Cache.Redis.csproj  -c Release --output nupkgs
dotnet pack Micro.Extensions.Logger/Micro.Extensions.Log.csproj  -c Release --output nupkgs
dotnet pack Micro.Extensions.Log.Kafka/Micro.Extensions.Log.Kafka.csproj  -c Release --output nupkgs
dotnet pack Micro.Extensions.Utilities/Micro.Extensions.Utilities.csproj  -c Release --output nupkgs

echo "打包成功！ "

set/p input=是否进行推送 [y/n]：
if "%input%"=="y" (echo "yes"
    for %%i in (nupkgs\*.nupkg) do (  
        dotnet nuget push %%i -s http://10.10.10.229:8081/repository/nuget-hosted/ -k eacaadb6-ec6f-3174-9ee3-3a6f95b822e3
        echo "推送"+%%i+"成功！" 
        )
) else ( echo "bye")

pause
